home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 013 / fatrestr.arc / FATBACK.ARC / UNERASE.DOC < prev   
Encoding:
Text File  |  1986-05-29  |  3.6 KB  |  71 lines

  1.                         UNERASE.DOC v1.0
  2.                             05/28/86
  3. Eric Gans
  4. French Dep't UCLA
  5. Los Angeles, CA 90024
  6.  
  7.      Since  immigrating to MS-DOS,  I have felt the absence of  a 
  8. public domain undelete program that unlike UNDEL.COM will work on 
  9. all  kinds of disks.  UNERASE is meant to fill this  gap.   (CP/M 
  10. users can use my XRASE program for this purpose.)  
  11.  
  12.      UNERASE  should work on any disk up to 20 megs,  or 30 if it 
  13. has fewer than 12,800 blocks,  which would be the case with a  4K 
  14. "block size.  (Since this is merely a question of buffer size, it 
  15. would  be  easy to change.)  It tests for DOS versions and  won't 
  16. ask  for  a path in version 1.   If your deleted file is  a  text 
  17. file,  you have the option of viewing the doubtful blocks  (those 
  18. after the first) before accepting them back in the file.
  19.  
  20.                             DBACK.COM
  21.  
  22.      Because  unerasing  on a hard disk is a  delicate  procedure 
  23. (the FAT and part of the directory must be rewritten to disk),  I 
  24. have  included in this ARC DBACK.COM,  which will back up the FAT 
  25. and root directory of a (hard) disk on another (floppy) disk, and 
  26. restore it in case catastrophe strikes.   DBACK makes a read-only 
  27. file called DBACK.DRx (x = backed up drive) in the root directory 
  28. of  the  backup drive.   For extra  security,  run  DBACK  before 
  29. unerasing;  since  the backup file is written on another disk  it 
  30. won't disturb the unerase procedure.  
  31.  
  32.      DBACK  is  also useful for general disk  security  purposes, 
  33. especially  for  assembly-language  programmers who are  often  a 
  34. keystroke or two away from trashing their disk.
  35.  
  36.      Don't  forget to copy DBACK.COM to a backup disk.   If it is 
  37. on  a  different diskette than DBACK.DRx,  you will  be  able  to 
  38. change  disks while running the program.   Just remember that  if 
  39. you ever need DBACK to restore your hard disk directory you won't 
  40. be able to find it there!
  41.  
  42. Notes:
  43.  
  44.      UNERASE  gets its disk information from the boot  sector  of 
  45. the  disk.   It  then  reads the FAT into memory  and  finds  the 
  46. filename of the lost file (its first byte has been replaced by E5 
  47. to  show erasure) in the appropriate directory,  which is located 
  48. on disk by following its path from the root disk directory.   The 
  49. first  block  of  the  file,  if  still  unused,  is  tentatively 
  50. restored.   Since  the  length of the file has  remained  in  the 
  51. directory  entry,  the  program  moves through the  FAT  checking 
  52. unused blocks.   If you use the verify option,  these blocks will 
  53. be  printed  on screen for inspection (this only works  for  text 
  54. since I haven't implemented a hex dump for object files).  If you 
  55. haven't  been doing too much erasing on your disk and  your  lost 
  56. file wasn't too fragmented, UNERASE should do the job.
  57.  
  58.      Undeleting  in DOS is less reliable than in CP/M  since  the 
  59. FAT  block addresses (after the first,  which is in the directory 
  60. entry)  are zeroed out,  whereas CP/M keeps them all in the  file 
  61. directory  until  the file's entry is  overwritten.   
  62.      
  63.      I  wonder  what  makes operating system writers so  hard  on 
  64. accidental   deletions;   sophisticated  MS-DOS  is   even   more 
  65. unforgiving than primitive CP/M.   Why can't a reliable  undelete 
  66. utility  be  supplied with the system (UNIX  does  this,  doesn't 
  67. it??),  or  at  least made available to programmers as  a  system 
  68. call?    DOS  could implement this easily enough,  for example by 
  69. only zeroing out the deleted blocks in one copy of the FAT (there 
  70. are always two) until the next disk write.
  71.